package cn.itcast.consumer.listener;

import cn.itcast.consumer.domain.User;
import cn.itcast.consumer.processor.MyProcessor;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.cloud.stream.messaging.Sink;
import org.springframework.messaging.Message;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
@EnableBinding(MyProcessor.class)
public class ConsumerMessageListener {
	// 监听 binding 为 Sink.INPUT 的消息
	@StreamListener(MyProcessor.INPUT_ORDER)
	public void input(String message) {
		System.out.println(message);
	}
}
